<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>生成代码</title>
    <link rel="stylesheet" type="text/css" href="easyui/themes/gray/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css"/>
    <script src="easyui/jquery.min.js"></script>
    <script src="easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#main_table').datagrid({
                method: 'post',
                url: '../getorgusers',
                toolbar: '#seach',
                pagination: true,
                fit: true,
                fitColumns: true,
                border: false,
                rownumbers: true,
                singleSelect: true,
                queryParams: {
                    orgcode: pid
                },
                columns: [[
                    {field: 'userid', title: '主键id', width: 50, checkbox: true},
                    {field: 'nickname', title: '用户昵称', width: 50},
                    {field: 'username', title: '用户名称', width: 50},
                    {field: 'name', title: '姓名', width: 50},
                    {field: 'gender', title: '性别', width: 50},
                    {field: 'telephone', title: '电话', width: 50},
                    {field: 'mobile', title: '手机', width: 50},
                    {field: 'orgcode', title: '组织编号', width: 50},
                    {field: 'email', title: '邮箱', width: 50},
                    {field: 'photo', title: '头像', width: 50},
                    {field: 'position', title: '职位', width: 50},
                    {field: 'location', title: '工位', width: 50},
                    {field: 'number', title: '工号', width: 50},
                    {field: 'remarks', title: '备注信息', width: 70}
                ]]
            });
        });

        function query() {
            $('#main_table').datagrid('load', {
                username: $('#username').textbox('getValue'),
                orgcode: pid
            });
        }

        function clear() {
            $('#username').textbox('clear');
        }

    </script>
</head>
<body class="easyui-layout" id="layout">
<div id="west"
     data-options="region:'west',collapsible:false,split:false">
    <!-- 搜索栏 -->
    <div id="seach">
        <label>用户名:</label>
        <input id="username" class="easyui-textbox" style="width: 120px;"/>
        <a href="javascript:query()" class="easyui-linkbutton"><i class="fa fa-search"></i> 搜索</a>
        <a href="javascript:clear()" class="easyui-linkbutton"><i class="fa fa-ban"></i> 清除</a>
        <a href="javascript:addorg()" class="easyui-linkbutton"><i class="fa fa-plus"></i> 新增组织</a>
        <a href="javascript:adduser()" class="easyui-linkbutton"><i class="fa fa-plus"></i> 新增员工</a>
    </div>
    <!-- 内容表格 -->
    <table id="main_table"></table>
</div>
<div data-options="region:'center'">
    <table id="_main_table">
    </table>
</div>
</body>
</html>
